-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the upsert metadata bug when adding segment with same comparison value #8590
Conversation
720db65
to
8c5e48e
Compare
Codecov Report
@@ Coverage Diff @@
## master #8590 +/- ##
============================================
- Coverage 69.02% 63.95% -5.07%
- Complexity 4314 4317 +3
============================================
Files 1691 1646 -45
Lines 88727 86807 -1920
Branches 13466 13255 -211
============================================
- Hits 61244 55519 -5725
- Misses 23197 27267 +4070
+ Partials 4286 4021 -265
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -103,13 +103,14 @@ public void addSegment(IndexSegment segment, Iterator<RecordInfo> recordInfoIter | |||
(primaryKey, currentRecordLocation) -> { | |||
if (currentRecordLocation != null) { | |||
// Existing primary key | |||
IndexSegment currentSegment = currentRecordLocation.getSegment(); | |||
int comparisonResult = recordInfo._comparisonValue.compareTo(currentRecordLocation.getComparisonValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious, which particular line caused the bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 140 in the old code (using ==
instead of equals()
for boxed value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. makes sense.
Fix the bug of reference check instead of value check in
PartitionUpsertMetadataManager.addSegment()